package com.zjl.springbatch;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ImportResource;

import java.nio.charset.Charset;

/**
 * navicat 的数据库管理下载地址
 * https://www.navicat.com.cn/download/navicat-premium-lite
 *
 * create table 新表 select * from 旧表
 * show tables like 'a%'   查找指定开头的表
 * truncate table 表名     清空表
 */
@SpringBootApplication(
        scanBasePackages = {"com.zjl.springbatch"}
)//告诉这是一个spring boot程序
@ImportResource(value = {"classpath:batch/jsrBaseContext.xml"})
@EnableBatchProcessing//开启spring batch
public class SpringBatchApplication {
    public static void main(String[] args) {
        System.setProperty("spring.profiles.active","uat");//  同理 --spring.profiles.active=xxx
        SpringApplication.run(SpringBatchApplication.class, args);
        System.out.println("***********启动完毕**当前编码:" + Charset.defaultCharset().name() + "****************");

    }

}

